/**
 * @file wa_area.h
 * 
 */


#ifndef _WA_AREA_H
#define _WA_AREA_H

#ifdef __cplusplus
extern "C" {
#endif

/*********************
 *      INCLUDES
 *********************/
#include "wa_conf.h"
#include <string.h>
#include <stddef.h>
#include <stdbool.h>
#include <stdint.h>
#include "wa_misc.h"
/*********************
 *      DEFINES
 *********************/

/**********************
 *      TYPEDEFS
 **********************/
 typedef struct
{
    int x;
    int y;
}wa_point;
 
typedef struct
{
    int x1;
    int y1;        
    int x2;
    int y2;        
}wa_area;
/**********************
 * GLOBAL PROTOTYPES
 **********************/
 
void wa_area_set(wa_area * area_p, int x1, int y1, int x2, int y2);
void wa_area_set_width(wa_area * area_p, int w);
void wa_area_set_height(wa_area * area_p, int h);
uint32_t wa_area_get_width(wa_area* area_p);
uint32_t wa_area_get_height(wa_area* area_p);
void wa_area_set_pos(wa_area * area_p, int x, int y);
uint32_t wa_area_get_size(wa_area * area_p);
wa_result wa_area_union(wa_area * res_p, wa_area * a1_p, wa_area * a2_p);
void wa_area_join(wa_area * a_res_p, wa_area * a1_p, wa_area * a2_p);
wa_result wa_area_is_point_on(wa_area * a_p, wa_point * p_p);
wa_result wa_area_is_on(wa_area * a1_p,wa_area * a2_p);
wa_result wa_area_is_in(wa_area * asub_p, wa_area * apar_p);
void wa_area_copy(wa_area* dst_area, wa_area* src_area);

/**********************
 *      MACROS
 **********************/


#ifdef __cplusplus
} /* extern "C" */
#endif





#endif 


